{{ define "main" }}

<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
    <div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
        {{ partial "body/breadcrumb" . }}
        <header class="list__header">
            <h5 class="list__header--title capitalize h5">{{.Title}}</h5>
        </header>

        <div class="list__header--desc single__contents p2">
            {{ .Content }}
        </div>

        <div class="summary__container" data-display="block">
            {{ $paginator := .Paginate (where .Pages "Type" .Type).ByWeight }}
            {{ range $paginator.Pages }}
                {{ .Render "summary" }}
            {{ end }}
            {{ partial "pagination/pagination" . }}
        </div>
        {{ partial "search/search-result-desktop" . }}
    </div>    

    {{ if $.Param "enableSidebar" }}
        <aside class="list__sidebar {{ if eq ($.Param "sidebarPosition") "left" }}l{{ else }}r{{ end }}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
            {{ partial "sidebar/sidebar-list" . }}
        </aside>
    {{ end }}
</main>

{{ partial "script/sidebar-script" . }}
{{ partial "script/list-script" . }}
{{ end }}